#ifndef DATA_SERIALIZATION_H
#define DATA_SERIALIZATION_H

#include "json/json.h"

#include "Objects/CommandType.h"
#include "Data/Objects/Command.h"
#include "Data/Objects/Action.h"
#include "Data/Objects/Rule.h"

#include "Data/Objects/PolygonShape.h"
#include "Data/Objects/Body.h"
#include "Data/Objects/Texture.h"
#include "Data/Objects/Model.h"

#include "Data/Objects/Detail.h"
#include "Data/Objects/RotorDef.h"
#include "Data/Objects/Rotor.h"

#include "Data/Objects/Link.h"

#include "Data/Objects/CreatureDef.h"
#include "Data/Objects/Creature.h"

#include "Data/Objects/PlayerType.h"
#include "Data/Objects/Player.h"

#include "Data/Objects/Obstacle.h"
#include "Data/Objects/Map.h"

#include "Data/Objects/Camera.h"

#include "Data/Objects/Scene.h"

namespace data {

	Scene DeserializeScene( const Json::Value& value );
	Json::Value SerializeScene( const Scene& scene );

	Camera DeserializeCamera( const Json::Value& value );
	Json::Value SerializeCamera( const Camera& camera );

	Map DeserializeMap( const Json::Value& value );
	Json::Value SerializeMap( const Map& map );

	Obstacle DeserializeObstacle( const Json::Value& value );
	Json::Value SerializeObstacle( const Obstacle& obstacle );

	Player DeserializePlayer( const Json::Value& value );
	Json::Value SerializePlayer( const Player& player );

	PlayerType DeserializePlayerType( const Json::Value& value );
	Json::Value SerializePlayerType( const PlayerType& value );

	Creature DeserializeCreature( const Json::Value& value );
	Json::Value SerializeCreature( const Creature& creature );

	CreatureDef DeserializeCreatureDef( const Json::Value& value );
	Json::Value SerializeCreatureDef( const CreatureDef& creatureDef );

	Detail DeserializeDetail( const Json::Value& value );
	Json::Value SerializeDetail( const Detail& detail );

	Rotor DeserializeRotor( const Json::Value& value );
	Json::Value SerializeRotor( const Rotor& rotor );

	RotorDef DeserializeRotorDef( const Json::Value& value );
	Json::Value SerializeRotorDef( const RotorDef& rotorDef );

	Link DeserializeLink( const Json::Value& value );
	Json::Value SerializeLink( const Link& link );

	Rule DeserializeRule( const Json::Value& value );
	Json::Value SerializeRule( const Rule& rule );

	Command DeserializeCommand( const Json::Value& value );
	Json::Value SerializeCommand( const Command& command );

	CommandType DeserializeCommandType( const Json::Value& value );
	Json::Value SerializeCommandType( const CommandType& commandType );

	Action DeserializeAction( const Json::Value& value );
	Json::Value SerializeAction( const Action& action );

	Model DeserializeModel( const Json::Value& value );
	Json::Value SerializeModel( const Model& model );

	Texture DeserializeTexture( const Json::Value& value );
	Json::Value SerializeTexture( const Texture& texture );

	Body DeserializeBody( const Json::Value& value );
	Json::Value SerializeBody( const Body& body );

	PolygonShape DeserializePolygonShape( const Json::Value& value );
	Json::Value SerializePolygonShape( const PolygonShape& polygon );

	cmn::Polygon DeserializePolygon( const Json::Value& value );
	Json::Value SerializePolygon( const cmn::Polygon& polygon );

	cmn::Circle DeserializeCircle( const Json::Value& value );
	Json::Value SerializeCircle( const cmn::Circle& circle );

	cmn::Transform DeserializeTransform( const Json::Value& value );
	Json::Value SerializeTransform( const cmn::Transform& transform );

	cmn::Vec2 DeserializeVec2( const Json::Value& value );
	Json::Value SerializeVec2( const cmn::Vec2& vec2 );
}
#endif
